package com.tuanzi.loan.web.lazy.compensation;

import com.tuanzi.loan.business.service.compensation.CompensationChildOrderService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.compensation.CompensationChildOrderRequest;
import com.tuanzi.loan.vo.response.compensation.CompensationChildOrderResponse;
import org.springframework.data.domain.Page;

/**
 * @author caiwanlin
 * @create 2019-02-13 11:48
 */
public class CompensationChildOrderLazyDataModel extends
        BaseLazyDataModel<CompensationChildOrderRequest,CompensationChildOrderResponse> {
    private CompensationChildOrderService compensationCompanyInfoService = SpringContextHolder.getBean(CompensationChildOrderService.class);
    public CompensationChildOrderLazyDataModel(CompensationChildOrderRequest compensationChildOrderRequest) {
        super(compensationChildOrderRequest);
    }

    @Override
    protected Page<CompensationChildOrderResponse> doLoad(PageSearcher<CompensationChildOrderRequest> pageSearcher) {
        return compensationCompanyInfoService.list(pageSearcher);
    }
}
